-- FETCH_MACHINE_FACTORY_MONSTER2

-- 抽取机械工厂刷出的怪物(血狼副本)
-- @param classId dungeon.csv中的class
return function(classId)
    local allInfo = ME.user.dbase:query("monster_building_info", {});
    local info = allInfo[classId] or {};
    local monsterNum = (info["monster_num"] or 0) + 1;

    local monsters = {[20041] = 21202, [20042] = 21302, [20043] = 21402, [20051] = 21502, [20052] = 21602, [20053] = 21702};

    -- 当前地牢
    local dungeonId = DungeonM.getDungeonId();

    -- 困难模式的X-04机械修理师
    local x04element;
    if dungeonId == 20043 then
        -- 血狼副本
        x04element = 21409;
    else
        -- 蓝鲨副本
        x04element = 21707;
    end

    if table.indexOf({20043, 20053}, dungeonId) >= 0 and monsterNum % 3 == 0 then
        -- 困难模式，每3个召唤
        return x04element;
    end

    -- 返回对应迷宫的element_id
    return monsters[dungeonId];
end